home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_08
/
1008084a
< prev
next >
Wrap
Text File
|
1991-12-02
|
846b
|
48 lines
// anyclass.hpp
// declaration of anyClass, a test
// class, and declaration of
// RefCntPtr to anyClass
#ifndef CLASS_anyClass
#define CLASS_anyClass
#include "refptr.hpp"
#include "refitem.hpp"
#include <iostream.h>
class anyClass : public RefCntItem
{
public:
int intVal;
char *string;
anyClass (void)
: RefCntItem()
, intVal(0)
, string(0)
{
cout << "anyClass constructor\n\n";
};
~anyClass (void)
{
cout << "anyClass destructor\n";
show();
};
void show(void)
{
cout << "anyClass contents:\n"
<< intVal << " "
<< string << "\n"
<< "reference count: "
<< refCnt() << "\n\n";
};
};
RefCntPtrDECLARE(anyClass)
#endif